import Mock from 'mockjs'
export default [
  {
    url: '/api/goods/list',
    method: 'get',
    timeout: 1000,
    response: () => {
      const arr = []
      for (let i = 0; i < 10; i++) {
        arr.push(
          // 这些字段是 要提前和后端沟通好
          Mock.mock({
            id: '@id',
            name: '@cname',
            date: '@datetime("yyyy-MM-dd A HH:mm:ss")',
            age: '@integer(10, 80)',
            p: '@paragraph(1, 3)'
          })
        )
      }
      // Mock.mock({
      //   'string|1-10"': '★★★'
      // })
      return { arr }
    }
  },
  {
    url: '/api/article/list',
    method: 'get',
    timeout: 1000,
    response: () => {
      const arr = []
      for (let i = 0; i < 10; i++) {
        arr.push(
          // 这些字段是 要提前和后端沟通好
          Mock.mock({
            id: '@id',
            name: '@cname',
            date: '@datetime("yyyy-MM-dd A HH:mm:ss")',
            age: '@integer(10, 80)',
            p: '@paragraph(1, 3)'
          })
        )
      }
      // Mock.mock({
      //   'string|1-10"': '★★★'
      // })
      return { arr }
    }
  },
]
